//
//  HHTest1ViewController.m
//  Flower
//
//  Created by 花花 on 2016/12/6.
//  Copyright © 2016年 花花. All rights reserved.
//

#import "HHTest1ViewController.h"
#import "UIViewController+HHScrollPageController.h"

@interface HHTest1ViewController ()

@end

@implementation HHTest1ViewController

- (void)viewDidLoad {

  
}

-(void)hh_viewDidLoadForIndex:(NSInteger)index{

    [super viewDidLoad];
    
    UIButton *btn =[UIButton buttonWithType:UIButtonTypeCustom];
    [btn setImage:[UIImage imageNamed:@"Smile-1"] forState:UIControlStateNormal];
    [btn setImage:[UIImage imageNamed:@"Smile"] forState:UIControlStateHighlighted];;
    
    
    btn.frame = CGRectMake((screen_width-100)/2, (screen_height-100-35-64)/2,100 ,100 );
    
    [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    self.hh_scrollViewController.title = @"标题叫啥哩";
    if (index%2 == 0) {
        self.view.backgroundColor =[UIColor colorWithRed:arc4random_uniform(255)/255.0 green:arc4random_uniform(255)/255.0 blue:arc4random_uniform(255)/255.0 alpha:1];
    }else{
        self.view.backgroundColor =[UIColor colorWithRed:arc4random_uniform(255)/255.0 green:arc4random_uniform(255)/255.0 blue:arc4random_uniform(255)/255.0 alpha:1];
    }
}
-(void)btnClick{

    HHTest2ViewController *test2 =[[HHTest2ViewController alloc]init];
    [self showViewController:test2 sender:nil];

}

@end
